<?php
/**
 * index.class
 *
 * script
 *
 * @version:	0.1a
 * @package:	global
 * @author:	alex_ez
 * @created:	22.05.2009 01:23:25
 *
 * @copyright:	(c) 2009 alex <qfox@ya.ru> yaroshevich aka alex_ez. All rights reserved.
 */


class indexAdminController extends adminController
{
	public function onstart( )
	{
		$this ->visitor = visitor::__getMe( );
		$this ->visitor ->needAuth( 'admin' );
		$this ->frame = 'admin/!index.tpl';
	}
	
	// /admin/
	public function showIndexPage( $p, $o )
	{
		//self::getAdminPage( );
		return 'Hello '.$this ->visitor ->viewuser ->somename.'. your state is '.$this ->visitor ->user['state'];
	}
	
	// /admin/test/
	public function showTestPage( $p, $o )
	{
		$this ->pageTitle = 'Cache';
		echo "hell in your map in your head.";
	}

	// /admin/recache/
	public function showRecachePage( $p, $o )
	{
		$this ->pageTitle = 'Cache';
		$cache = cache::__getMe( );
		$cache ->flush_for_class( 'controller' );
		echo "Pages recached.";
	}
	
	public function ajaxGet( $p )
	{
		fb::log( request::__getMe( ) ->p_type );
		return array( );
	}
}


?>